home *** CD-ROM | disk | FTP | other *** search
- Path: anvil.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Best way to insert in file
- Date: 27 Feb 1996 15:59:51 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4h05tnINNic5@anvil.ugrad.cs.ubc.ca>
- References: <4gldjl$cck@news.fwi.com> <1996Feb25.164738.7783@zcon.com> <4gqvppINNh86@keats.ugrad.cs.ubc.ca> <31335B38.7306EBA@eiffel.com>
- NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
-
- In article <31335B38.7306EBA@eiffel.com>,
- Guus Leeuw jr. <guusl@eiffel.com> wrote:
- >Kazimir Kylheku wrote:
- >>
- >[snip snip]
- >> >19.14: How can I insert or delete a line (or record) in the middle of a
- >> > file?
- >> >
- >> >If you do not have the comp.lang.c FAQ, it can be found at rtfm.mit.edu
- >> >in an appropriate subdirectory of /pub/usenet/.
- >>
- >> Of course, the real answer is to avoid writing a C program, and use a filter
- >> utility called "sed". I have used this little program to edit the 200,000+th
- >> line of a 400,000 line text file. Writing C code to do the same thing is
- >> redundant, considering that sed can do all kinds of things to a file other than
- >> just insert and delete lines.
- >
- >What makes you think that person is using UNIX?
-
- What makes you think you can't get ``sed'' for DOS? I have used grep under DOS,
- make, vi, gzip, gcc, gas, flex, bison and even GNU Emacs running in a 32-bit
- extender. Indeed, with the limited memory management resources on this
- platform, a sed-like program is the only way to edit large files. You can't
- get away with loading a 40MB file into vi, and count on a 64MB swap partition
- to absorb the shock.
- --
-
-